﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace BZZ.Web.ctrl
{
    public partial class ctrHotArticles : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            BZZ.DAL.blogComment dal = new BZZ.DAL.blogComment();
            DataSet dset = dal.GetDataset("1=1 order by id desc", null, "nickname,blogid,commentcontent,pubdate", 10);
            rptHotArticles.DataSource = dset;
            rptHotArticles.DataBind();
        }

        public string getSumary(string content)
        {
            string rtn = content;
            if (content.Length > 10) rtn = content.Substring(0, 10);
            return rtn;
        }
    }
}